<?php
class CustLocation extends AppModel {
    var $name = 'CustLocation';

    var $belongsTo = array(
        'User' => array(
            'foreignKey' => 'collector_id',
            'fields' => array('name')
        ),
    );

    var $validate = array(
        'name' => array(
                'notEmpty' => array(
                    'rule' => array('notEmpty'),
                    'message' => 'Location name is required.',
                    'required' => true,
            ),
        ),
        'site_id' => array(
                'notEmpty' => array(
                    'rule' => array('notEmpty'),
                    'message' => 'Site is required.',
                    'required' => true,
            ),
        )
    );
}
